<?php
namespace action\main;
use \cass\Cache;
class indexAction extends \cass\Action {

    /**
     * Méthode de cache
     * @return Integer Type de cache (Cache::<type>)
     */
    public function cache() {
	return array(
	    'execute' => Cache::SESSION_ONCE
	);
    }

    /**
     * Méthode de l'index
     */
    
    public function execute() { 
        $this->setTitle('Accueil');
        $this->news = $this->doctrine->createQuery('SELECT n FROM News n')->setMaxResults(3)->execute();
    }
}